\hypertarget{group__qei__api}{
\section{Qei\_\-api}
\label{group__qei__api}\index{Qei\_\-api@{Qei\_\-api}}
}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__qei__api_gab32f07bbeb9e4d179fad158dd0c26ddd}{QEIEnable} (unsigned long ulBase)
\item 
void \hyperlink{group__qei__api_ga867d5daa61afb9e6a8aa3da2470666c4}{QEIDisable} (unsigned long ulBase)
\item 
void \hyperlink{group__qei__api_ga98b91a93994efe4aa39b22bc45a879bf}{QEIConfigure} (unsigned long ulBase, unsigned long ulConfig, unsigned long ulMaxPosition)
\item 
unsigned long \hyperlink{group__qei__api_ga04da36695c3205cdfc4ed19d6f68f54f}{QEIPositionGet} (unsigned long ulBase)
\item 
void \hyperlink{group__qei__api_ga28b3fcb8bc609f883899422abae0f53c}{QEIPositionSet} (unsigned long ulBase, unsigned long ulPosition)
\item 
long \hyperlink{group__qei__api_ga0119557493afc57b46f17fde5ea0f096}{QEIDirectionGet} (unsigned long ulBase)
\item 
tBoolean \hyperlink{group__qei__api_ga869290c5793faabc3c181ff618945998}{QEIErrorGet} (unsigned long ulBase)
\item 
void \hyperlink{group__qei__api_ga56780834469d7687ac0f8dacf62e1322}{QEIVelocityEnable} (unsigned long ulBase)
\item 
void \hyperlink{group__qei__api_gacd9294b753020cbbc2411f643ebbac3a}{QEIVelocityDisable} (unsigned long ulBase)
\item 
void \hyperlink{group__qei__api_ga993ff3bd11c66c95a22801a23683387b}{QEIVelocityConfigure} (unsigned long ulBase, unsigned long ulPreDiv, unsigned long ulPeriod)
\item 
unsigned long \hyperlink{group__qei__api_gac041b32f296da528284f0d5c326344b0}{QEIVelocityGet} (unsigned long ulBase)
\item 
void \hyperlink{group__qei__api_ga5eed9bf230f619fa878358a03defb888}{QEIIntRegister} (unsigned long ulBase, void($\ast$pfnHandler)(void))
\item 
void \hyperlink{group__qei__api_ga105ca02c25010eb5d4c3d2f833584be1}{QEIIntUnregister} (unsigned long ulBase)
\item 
void \hyperlink{group__qei__api_gaef193454813aee1ff44142af9af24e2d}{QEIIntEnable} (unsigned long ulBase, unsigned long ulIntFlags)
\item 
void \hyperlink{group__qei__api_ga6bb9a070261474f4b4b3f3011b361913}{QEIIntDisable} (unsigned long ulBase, unsigned long ulIntFlags)
\item 
unsigned long \hyperlink{group__qei__api_ga5149c0cb1df27743ca635c3fac57549a}{QEIIntStatus} (unsigned long ulBase, tBoolean bMasked)
\item 
void \hyperlink{group__qei__api_ga1506cc404388900b300be42973b49ade}{QEIIntClear} (unsigned long ulBase, unsigned long ulIntFlags)
\end{DoxyCompactItemize}


\subsection{Function Documentation}
\hypertarget{group__qei__api_ga98b91a93994efe4aa39b22bc45a879bf}{
\index{qei\_\-api@{qei\_\-api}!QEIConfigure@{QEIConfigure}}
\index{QEIConfigure@{QEIConfigure}!qei_api@{qei\_\-api}}
\subsubsection[{QEIConfigure}]{\setlength{\rightskip}{0pt plus 5cm}void QEIConfigure (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulConfig, }
\item[{unsigned long}]{ ulMaxPosition}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_ga98b91a93994efe4aa39b22bc45a879bf}
Configures the quadrature encoder.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module. \item[{\em ulConfig}]is the configuration for the quadrature encoder. See below for a description of this parameter. \item[{\em ulMaxPosition}]specifies the maximum position value.\end{DoxyParams}
This will configure the operation of the quadrature encoder. The {\itshape ulConfig\/} parameter provides the configuration of the encoder and is the logical OR of several values:


\begin{DoxyItemize}
\item {\bfseries QEI\_\-CONFIG\_\-CAPTURE\_\-A} or {\bfseries QEI\_\-CONFIG\_\-CAPTURE\_\-A\_\-B} to specify if edges on channel A or on both channels A and B should be counted by the position integrator and velocity accumulator.
\item {\bfseries QEI\_\-CONFIG\_\-NO\_\-RESET} or {\bfseries QEI\_\-CONFIG\_\-RESET\_\-IDX} to specify if the position integrator should be reset when the index pulse is detected.
\item {\bfseries QEI\_\-CONFIG\_\-QUADRATURE} or {\bfseries QEI\_\-CONFIG\_\-CLOCK\_\-DIR} to specify if quadrature signals are being provided on ChA and ChB, or if a direction signal and a clock are being provided instead.
\item {\bfseries QEI\_\-CONFIG\_\-NO\_\-SWAP} or {\bfseries QEI\_\-CONFIG\_\-SWAP} to specify if the signals provided on ChA and ChB should be swapped before being processed.
\end{DoxyItemize}

{\itshape ulMaxPosition\/} is the maximum value of the position integrator, and is the value used to reset the position capture when in index reset mode and moving in the reverse (negative) direction.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__qei__api_ga0119557493afc57b46f17fde5ea0f096}{
\index{qei\_\-api@{qei\_\-api}!QEIDirectionGet@{QEIDirectionGet}}
\index{QEIDirectionGet@{QEIDirectionGet}!qei_api@{qei\_\-api}}
\subsubsection[{QEIDirectionGet}]{\setlength{\rightskip}{0pt plus 5cm}long QEIDirectionGet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_ga0119557493afc57b46f17fde5ea0f096}
Gets the current direction of rotation.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module.\end{DoxyParams}
This returns the current direction of rotation. In this case, current means the most recently detected direction of the encoder; it may not be presently moving but this is the direction it last moved before it stopped.

\begin{DoxyReturn}{Returns}
Returns 1 if moving in the forward direction or -\/1 if moving in the reverse direction. 
\end{DoxyReturn}
\hypertarget{group__qei__api_ga867d5daa61afb9e6a8aa3da2470666c4}{
\index{qei\_\-api@{qei\_\-api}!QEIDisable@{QEIDisable}}
\index{QEIDisable@{QEIDisable}!qei_api@{qei\_\-api}}
\subsubsection[{QEIDisable}]{\setlength{\rightskip}{0pt plus 5cm}void QEIDisable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_ga867d5daa61afb9e6a8aa3da2470666c4}
Disables the quadrature encoder.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module.\end{DoxyParams}
This will disable operation of the quadrature encoder module.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__qei__api_gab32f07bbeb9e4d179fad158dd0c26ddd}{
\index{qei\_\-api@{qei\_\-api}!QEIEnable@{QEIEnable}}
\index{QEIEnable@{QEIEnable}!qei_api@{qei\_\-api}}
\subsubsection[{QEIEnable}]{\setlength{\rightskip}{0pt plus 5cm}void QEIEnable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_gab32f07bbeb9e4d179fad158dd0c26ddd}
Enables the quadrature encoder.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module.\end{DoxyParams}
This will enable operation of the quadrature encoder module. It must be configured before it is enabled.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__qei__api_ga98b91a93994efe4aa39b22bc45a879bf}{QEIConfigure()}
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__qei__api_ga869290c5793faabc3c181ff618945998}{
\index{qei\_\-api@{qei\_\-api}!QEIErrorGet@{QEIErrorGet}}
\index{QEIErrorGet@{QEIErrorGet}!qei_api@{qei\_\-api}}
\subsubsection[{QEIErrorGet}]{\setlength{\rightskip}{0pt plus 5cm}tBoolean QEIErrorGet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_ga869290c5793faabc3c181ff618945998}
Gets the encoder error indicator.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module.\end{DoxyParams}
This returns the error indicator for the quadrature encoder. It is an error for both of the signals of the quadrature input to change at the same time.

\begin{DoxyReturn}{Returns}
Returns {\bfseries true} if an error has occurred and {\bfseries false} otherwise. 
\end{DoxyReturn}
\hypertarget{group__qei__api_ga1506cc404388900b300be42973b49ade}{
\index{qei\_\-api@{qei\_\-api}!QEIIntClear@{QEIIntClear}}
\index{QEIIntClear@{QEIIntClear}!qei_api@{qei\_\-api}}
\subsubsection[{QEIIntClear}]{\setlength{\rightskip}{0pt plus 5cm}void QEIIntClear (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulIntFlags}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_ga1506cc404388900b300be42973b49ade}
Clears quadrature encoder interrupt sources.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module. \item[{\em ulIntFlags}]is a bit mask of the interrupt sources to be cleared. Can be any of the {\bfseries QEI\_\-INTERROR}, {\bfseries QEI\_\-INTDIR}, {\bfseries QEI\_\-INTTIMER}, or {\bfseries QEI\_\-INTINDEX} values.\end{DoxyParams}
The specified quadrature encoder interrupt sources are cleared, so that they no longer assert. This must be done in the interrupt handler to keep it from being called again immediately upon exit.

\begin{DoxyNote}{Note}
Since there is a write buffer in the Cortex-\/M3 processor, it may take several clock cycles before the interrupt source is actually cleared. Therefore, it is recommended that the interrupt source be cleared early in the interrupt handler (as opposed to the very last action) to avoid returning from the interrupt handler before the interrupt source is actually cleared. Failure to do so may result in the interrupt handler being immediately reentered (since NVIC still sees the interrupt source asserted).
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__qei__api_ga6bb9a070261474f4b4b3f3011b361913}{
\index{qei\_\-api@{qei\_\-api}!QEIIntDisable@{QEIIntDisable}}
\index{QEIIntDisable@{QEIIntDisable}!qei_api@{qei\_\-api}}
\subsubsection[{QEIIntDisable}]{\setlength{\rightskip}{0pt plus 5cm}void QEIIntDisable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulIntFlags}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_ga6bb9a070261474f4b4b3f3011b361913}
Disables individual quadrature encoder interrupt sources.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module. \item[{\em ulIntFlags}]is a bit mask of the interrupt sources to be disabled. Can be any of the {\bfseries QEI\_\-INTERROR}, {\bfseries QEI\_\-INTDIR}, {\bfseries QEI\_\-INTTIMER}, or {\bfseries QEI\_\-INTINDEX} values.\end{DoxyParams}
Disables the indicated quadrature encoder interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__qei__api_gaef193454813aee1ff44142af9af24e2d}{
\index{qei\_\-api@{qei\_\-api}!QEIIntEnable@{QEIIntEnable}}
\index{QEIIntEnable@{QEIIntEnable}!qei_api@{qei\_\-api}}
\subsubsection[{QEIIntEnable}]{\setlength{\rightskip}{0pt plus 5cm}void QEIIntEnable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulIntFlags}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_gaef193454813aee1ff44142af9af24e2d}
Enables individual quadrature encoder interrupt sources.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module. \item[{\em ulIntFlags}]is a bit mask of the interrupt sources to be enabled. Can be any of the {\bfseries QEI\_\-INTERROR}, {\bfseries QEI\_\-INTDIR}, {\bfseries QEI\_\-INTTIMER}, or {\bfseries QEI\_\-INTINDEX} values.\end{DoxyParams}
Enables the indicated quadrature encoder interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__qei__api_ga5eed9bf230f619fa878358a03defb888}{
\index{qei\_\-api@{qei\_\-api}!QEIIntRegister@{QEIIntRegister}}
\index{QEIIntRegister@{QEIIntRegister}!qei_api@{qei\_\-api}}
\subsubsection[{QEIIntRegister}]{\setlength{\rightskip}{0pt plus 5cm}void QEIIntRegister (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{void($\ast$)(void)}]{ pfnHandler}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_ga5eed9bf230f619fa878358a03defb888}
Registers an interrupt handler for the quadrature encoder interrupt.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module. \item[{\em pfnHandler}]is a pointer to the function to be called when the quadrature encoder interrupt occurs.\end{DoxyParams}
This sets the handler to be called when a quadrature encoder interrupt occurs. This will enable the global interrupt in the interrupt controller; specific quadrature encoder interrupts must be enabled via \hyperlink{group__qei__api_gaef193454813aee1ff44142af9af24e2d}{QEIIntEnable()}. It is the interrupt handler's responsibility to clear the interrupt source via \hyperlink{group__qei__api_ga1506cc404388900b300be42973b49ade}{QEIIntClear()}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__interrupt__api_ga471d00d73ae22faa426c202f608e9c69}{IntRegister()} for important information about registering interrupt handlers.
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__qei__api_ga5149c0cb1df27743ca635c3fac57549a}{
\index{qei\_\-api@{qei\_\-api}!QEIIntStatus@{QEIIntStatus}}
\index{QEIIntStatus@{QEIIntStatus}!qei_api@{qei\_\-api}}
\subsubsection[{QEIIntStatus}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long QEIIntStatus (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{tBoolean}]{ bMasked}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_ga5149c0cb1df27743ca635c3fac57549a}
Gets the current interrupt status.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module. \item[{\em bMasked}]is false if the raw interrupt status is required and true if the masked interrupt status is required.\end{DoxyParams}
This returns the interrupt status for the quadrature encoder module. Either the raw interrupt status or the status of interrupts that are allowed to reflect to the processor can be returned.

\begin{DoxyReturn}{Returns}
Returns the current interrupt status, enumerated as a bit field of {\bfseries QEI\_\-INTERROR}, {\bfseries QEI\_\-INTDIR}, {\bfseries QEI\_\-INTTIMER}, and {\bfseries QEI\_\-INTINDEX}. 
\end{DoxyReturn}
\hypertarget{group__qei__api_ga105ca02c25010eb5d4c3d2f833584be1}{
\index{qei\_\-api@{qei\_\-api}!QEIIntUnregister@{QEIIntUnregister}}
\index{QEIIntUnregister@{QEIIntUnregister}!qei_api@{qei\_\-api}}
\subsubsection[{QEIIntUnregister}]{\setlength{\rightskip}{0pt plus 5cm}void QEIIntUnregister (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_ga105ca02c25010eb5d4c3d2f833584be1}
Unregisters an interrupt handler for the quadrature encoder interrupt.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module.\end{DoxyParams}
This function will clear the handler to be called when a quadrature encoder interrupt occurs. This will also mask off the interrupt in the interrupt controller so that the interrupt handler no longer is called.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__interrupt__api_ga471d00d73ae22faa426c202f608e9c69}{IntRegister()} for important information about registering interrupt handlers.
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__qei__api_ga04da36695c3205cdfc4ed19d6f68f54f}{
\index{qei\_\-api@{qei\_\-api}!QEIPositionGet@{QEIPositionGet}}
\index{QEIPositionGet@{QEIPositionGet}!qei_api@{qei\_\-api}}
\subsubsection[{QEIPositionGet}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long QEIPositionGet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_ga04da36695c3205cdfc4ed19d6f68f54f}
Gets the current encoder position.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module.\end{DoxyParams}
This returns the current position of the encoder. Depending upon the configuration of the encoder, and the incident of an index pulse, this value may or may not contain the expected data (that is, if in reset on index mode, if an index pulse has not been encountered, the position counter will not be aligned with the index pulse yet).

\begin{DoxyReturn}{Returns}
The current position of the encoder. 
\end{DoxyReturn}
\hypertarget{group__qei__api_ga28b3fcb8bc609f883899422abae0f53c}{
\index{qei\_\-api@{qei\_\-api}!QEIPositionSet@{QEIPositionSet}}
\index{QEIPositionSet@{QEIPositionSet}!qei_api@{qei\_\-api}}
\subsubsection[{QEIPositionSet}]{\setlength{\rightskip}{0pt plus 5cm}void QEIPositionSet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulPosition}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_ga28b3fcb8bc609f883899422abae0f53c}
Sets the current encoder position.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module. \item[{\em ulPosition}]is the new position for the encoder.\end{DoxyParams}
This sets the current position of the encoder; the encoder position will then be measured relative to this value.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__qei__api_ga993ff3bd11c66c95a22801a23683387b}{
\index{qei\_\-api@{qei\_\-api}!QEIVelocityConfigure@{QEIVelocityConfigure}}
\index{QEIVelocityConfigure@{QEIVelocityConfigure}!qei_api@{qei\_\-api}}
\subsubsection[{QEIVelocityConfigure}]{\setlength{\rightskip}{0pt plus 5cm}void QEIVelocityConfigure (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulPreDiv, }
\item[{unsigned long}]{ ulPeriod}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_ga993ff3bd11c66c95a22801a23683387b}
Configures the velocity capture.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module. \item[{\em ulPreDiv}]specifies the predivider applied to the input quadrature signal before it is counted; can be one of {\bfseries QEI\_\-VELDIV\_\-1}, {\bfseries QEI\_\-VELDIV\_\-2}, {\bfseries QEI\_\-VELDIV\_\-4}, {\bfseries QEI\_\-VELDIV\_\-8}, {\bfseries QEI\_\-VELDIV\_\-16}, {\bfseries QEI\_\-VELDIV\_\-32}, {\bfseries QEI\_\-VELDIV\_\-64}, or {\bfseries QEI\_\-VELDIV\_\-128}. \item[{\em ulPeriod}]specifies the number of clock ticks over which to measure the velocity; must be non-\/zero.\end{DoxyParams}
This will configure the operation of the velocity capture portion of the quadrature encoder. The position increment signal is predivided as specified by {\itshape ulPreDiv\/} before being accumulated by the velocity capture. The divided signal is accumulated over {\itshape ulPeriod\/} system clock before being saved and resetting the accumulator.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__qei__api_gacd9294b753020cbbc2411f643ebbac3a}{
\index{qei\_\-api@{qei\_\-api}!QEIVelocityDisable@{QEIVelocityDisable}}
\index{QEIVelocityDisable@{QEIVelocityDisable}!qei_api@{qei\_\-api}}
\subsubsection[{QEIVelocityDisable}]{\setlength{\rightskip}{0pt plus 5cm}void QEIVelocityDisable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_gacd9294b753020cbbc2411f643ebbac3a}
Disables the velocity capture.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module.\end{DoxyParams}
This will disable operation of the velocity capture in the quadrature encoder module.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__qei__api_ga56780834469d7687ac0f8dacf62e1322}{
\index{qei\_\-api@{qei\_\-api}!QEIVelocityEnable@{QEIVelocityEnable}}
\index{QEIVelocityEnable@{QEIVelocityEnable}!qei_api@{qei\_\-api}}
\subsubsection[{QEIVelocityEnable}]{\setlength{\rightskip}{0pt plus 5cm}void QEIVelocityEnable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_ga56780834469d7687ac0f8dacf62e1322}
Enables the velocity capture.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module.\end{DoxyParams}
This will enable operation of the velocity capture in the quadrature encoder module. It must be configured before it is enabled. Velocity capture will not occur if the quadrature encoder is not enabled.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__qei__api_ga993ff3bd11c66c95a22801a23683387b}{QEIVelocityConfigure()} and \hyperlink{group__qei__api_gab32f07bbeb9e4d179fad158dd0c26ddd}{QEIEnable()}
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__qei__api_gac041b32f296da528284f0d5c326344b0}{
\index{qei\_\-api@{qei\_\-api}!QEIVelocityGet@{QEIVelocityGet}}
\index{QEIVelocityGet@{QEIVelocityGet}!qei_api@{qei\_\-api}}
\subsubsection[{QEIVelocityGet}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long QEIVelocityGet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__qei__api_gac041b32f296da528284f0d5c326344b0}
Gets the current encoder speed.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the quadrature encoder module.\end{DoxyParams}
This returns the current speed of the encoder. The value returned is the number of pulses detected in the specified time period; this number can be multiplied by the number of time periods per second and divided by the number of pulses per revolution to obtain the number of revolutions per second.

\begin{DoxyReturn}{Returns}
Returns the number of pulses captured in the given time period. 
\end{DoxyReturn}
